// import axios from "../../../api/gw/axios";
import axios from "axios";
//import * as api from "../../../api/gw/index.js";
import getGoodsDate from "./getGoodsDate";
export default function (params,relGroup,callback, errFn) {
    // console.log("请求的接口", api, api.CONFIG_HOST + api.enableOdisable);
//  let url =  'http://test.mall.yn.weilian.cn/resourceLevel/deleteResourceLevel',
	let url =  window.api.config_host+'/resourceConfig/resource/newborn';
    let options = {
        method: "delete",
        url: url,
        params:params,
        headers: {sessionId: getCookie("sessionId")}
    }
    axios(options).then(data => {
        if (data.status === 200 && data.data.returnCode === 1) {
            //修改成功
            console.log("删除成功");
            // console.log(data.data.data[0]);
            callback && getGoodsDate(callback,relGroup);
            // callback && callback(data.data.data[0]);
        } else {
            errFn && errFn();
        } 
    }).catch(err => {
        console.log(err);
        errFn && errFn();
    });
}
